import sginUp.SginUp;
import signIn.SignIn;

import javax.swing.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class App {
    public static void main(String[] args) {

        StratFrame();

    }
    private static void StratFrame(){
        JFrame jFrame=new JFrame("拼图小游戏");
        jFrame.setSize(250, 150);
        jFrame.setAlwaysOnTop(true);
        jFrame.setLocationRelativeTo(null);
        jFrame.setLayout(null);
        jFrame.setDefaultCloseOperation(3);
        JButton signUp = new JButton("登录");
        JButton signIn = new JButton("注册");
        signIn.setBounds(95, 20, 60, 20);
        signUp.setBounds(95, 60, 60, 20);
        signUp.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                jFrame.setVisible(false);
                new SginUp();}
        });
        signIn.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                jFrame.setVisible(false);
                new SignIn();}
        });
        jFrame.add(signUp);
        jFrame.add(signIn);
        jFrame.setVisible(true);
    }
}
